<!DOCTYPE html>
<html style="background: #FFFFFF;">
	<head>
		<meta charset="utf-8">
		<title>LingPowerAI</title>
		<meta name="viewport" content="width=device-width,initial-scale=1,minimum-scale=1,maximum-scale=1,user-scalable=no" />
		<script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
		<script type="text/javascript">
			document.write('<script src="../../js/fix.js?rd=?rd=' + Math.random() + '"><\/script>');
		</script>
		<link rel="stylesheet" href="../../fonts/iconfont/iconfont.css">
		<script src="../../js/PinYinUti.js"></script>
		<script src="../../js/H5+.js"></script>
		<script type="text/javascript">
			link(['../../css/reset.css']);
		</script>
		
		<style type="text/css">
			.pick_photo {
				width: 0.6rem;
				height: 0.6rem;
			}

			.display-inline {
				display: inline-block;
			}


			label,
			i {
				color: #5A5A5A;
			}

			.card-dash {
				width: 100%;
				background-color: #FFFFFF;
				padding: 0.1rem 0.1rem;
				margin-bottom: 0.01rem !important;
			}

			.card-dash:first-child {
				margin-top: 0.1rem !important;
			}

			.i_blue {
				color: #47BAFE
			}

			.cont_table td {
				width: 25%;
				text-align: center;
				border-right: 0.01rem solid #c0d3df;
			}

			.cont_table td:last-child {
				border: none;
			}

			.cont_table td label {
				display: block;
			}

			.left-border3 {
				border-left: 0.03rem solid #47BAFE;
			}

			.float-m9 {
				margin: 0.08rem auto 0;
				width: 100%;
			}

			.clear2 {
				margin: 0.02rem 0;
			}

			.clear5 {
				margin: 0.05rem 0;
			}

			.clear10 {
				margin: 0.1rem 0;
				display: inline-block;
				width: 100%;
				border-top: 0.01rem solid #c0d3df;
				padding: 0 0.1rem;
			}

			.progress {
				height: 1rem;
				width: 1.2rem;
				display: inline-block;
				width: 30%;
			}

			.progress>svg {
				height: 100%;
				display: block;
			}

			.progressbar__label {
				text-align: center;
			}

			.div_tags {
				display: inline-block;
				vertical-align: top;
				width: 60%;
				margin-left: 0.2rem;
				margin-top: 0.2rem;
			}

			.tags {
				display: inline-block;
				padding: 0.02rem 0.1rem;
				margin: 0.05rem;
				background-color: #9a9a9a;
				color: #fff;
				border-radius: 4px;
			}

			.tips {
				color: #5A5A5A;
				font-size: 0.1rem;
				display: flex;
			}

			.sp_date {
				padding: 0.2rem;
				display: block;
				background-color: #47BAFE;
			}

			.sp_month {
				display: block;
				color: #47BAFE;
			}

			.div_ac_type {
				padding: 0.01rem 0.05rem;
				border: grey solid 0.01rem;
				vertical-align: middle;
			}

			.bg_color_blue1 {
				background-color: #186FFF;
			}

			.bg_color_blue2 {
				background-color: #0DA3FF;
			}

			.bg_color_blue3 {
				background-color: #05CDE5;
			}

			.bg_color_green {
				background-color: #03D58D;
			}

			.span_product {
				color: #9C9C9C;
				padding: 0.05rem 0.1rem;
				border: grey solid 0.01rem;
				width: 0.8rem;
				word-break: normal;
				display: inline-block;
				white-space: pre-wrap;
				word-wrap: break-word;
				overflow: hidden;
			}

			ul {
				padding-left: 0;
				width: 100%;
				margin: 0 auto;
			}

			/* li{ padding:5px 0!important;margin: 0 auto;} */
			.fa-mobile {
				font-size: 0.18rem;
			}

			.star {
				display: inline-block;
				width: 0.16rem;
				height: 0.16rem;
				background: url(../../images/kx.png) no-repeat;
				background-size: 100% 100%;
			}

			.card-dash {
				padding: 0.1rem 0.15rem;
			}

			.mui-collapseli {
				position: relative;
				display: flex;
				align-items: center;
				padding: 0rem 0.15rem !important;
				border-bottom: .5px solid #c8c7cc;
			}

			.call_li {
				padding: 0.1rem 0.15rem !important;
			}

			.mui-collapseli:last-child {
				border-bottom: none;
			}

			.mui-collapseli .div_date {
				flex: 2;
				display: flex;
				flex-direction: column;
				align-items: center;
			}

			.mui-collapseli .div_date .sp_date {
				width: 0.37rem;
				height: 0.37rem;
				display: flex;
				justify-content: center;
				line-height: 0px;
				border-radius: 4px;
				color: white;
			}

			.mui-collapseli .div_plan {
				flex: 5;
				display: flex;
				flex-direction: column;
				justify-content: flex-start;
			}

			.mui-collapseli .div_plan span {
				color: #5a5a5a;
				font-size: 0.12rem;
			}

			.mui-collapseli .div_plan span:first-child {
				font-size: 0.16rem;
				color: #000000;
			}

			.div_ac_type {
				background-color: #47BAFE !important;
				border: 0;
				border-radius: 6px;
			}

			.div_products {
				display: flex;
				justify-content: space-around;
			}

			.div_products span {
				border-radius: 8px;
			}

			.xuan {
				color: white;
				background-color: #9c9c9c;
			}

			.div_name {
				display: flex;
				align-items: flex-start;
			}

			.sp_log_type,
			.sp_ac_type {
				color: white;
				line-height: 0.35rem;
				font-size: 0.13rem !important;
			}

			#topPopover {
				position: fixed;
				top: 0.1rem;
				width: 1.5rem;
				right: 0.1rem;
				z-index: 3;
				display: none;
				margin-right: -0.05rem;
			}

			#topPopover:before {
				content: '';
				width: 0;
				height: 0;
				border: 0.1rem solid transparent;
				/*调整小三角形的大小*/
				border-bottom-color: white;
				position: absolute;
				right: 0.1rem;
				/*调整小三角形的位置*/
				bottom: 100%;
				/*调整小三角形的位置*/
				margin-top: 0.2rem;
				/*调整小三角形的位置*/

			}

			#topPopover .mui-scroll-wrapper {
				margin-top: 0.05rem;
			}

			.mui-popover.mui-active {
				width: 1.4rem;
				background-color: white;
				display: block;
				top: 0.5rem !important;
			}

			#topPopover .mui-scroll li span {
				margin-right: 0.1rem;
			}

			#topPopover .more_ul:before,
			.more_ul:after {
				background: none;
			}

			#topPopover .more_ul {
				border-radius: 5px;
				overflow: hidden;
			}

			#topPopover .more_ul li {
				padding: 0px;
				border: none;
				padding-left: 0.2rem;
				padding-top: 0.04rem;
				height: 0.45rem;
				line-height: 0.45rem;
			}

			.mui-hidden {
				z-index: 1;
			}

			.mask {
				position: fixed;
				width: 100vw;
				height: 100vh;
				background-color: rgba(0, 0, 0, 0.3);
				z-index: 2;
				top: 0rem;
				display: none;
			}

			.mui-collapseli {
				padding-left: 0.05rem;
				padding-right: 0.05rem;
			}



			.voice {
				position: relative;
				display: inline-block;
				width: 65%;
				height: 0.3rem;
				line-height: 0.3rem;
				margin-bottom: 0.05rem;
				background: #eee;
				color: #47BAFE !important;
				border-radius: 0 0.07rem 0.07rem;
			}

			.bg {
				background: url("") right 0 no-repeat;
				width: 0.2rem;
				height: 0.2rem;
				background-size: 400%;
				margin-top: 0.05rem;
				margin-left: 0.1rem;
				display: inline-block;

			}

			.voicePlay {
				animation-name: voicePlay;
				animation-duration: 1s;
				animation-direction: normal;
				animation-iteration-count: infinite;
				animation-timing-function: steps(3);
			}

			@keyframes voicePlay {
				0% {
					background-position: 0;
				}

				100% {
					background-position: 100%;
				}
			}

			.chaochu {
				display: inline-block;
				white-space: nowrap;
				text-overflow: ellipsis;
				overflow: hidden;

			}

			.audiotip {
				position: absolute;
				top: 0px;
				display: block;
				background-color: rgba(0, 0, 0, 0.59);
				color: #FFFFFF;
				padding: 0.05rem 0.05rem;
				border-radius: 5px;

			}

			.opentiPrant {
				overflow: hidden;
				width: 95%;
				text-overflow: ellipsis;
				white-space: nowrap;
			}



			.mui-popup-button:first-child {
				color: #999999;
			}

			.wxmoment_text {
				overflow: hidden;
				text-overflow: ellipsis;
				box-sizing: content-box;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
				font-size: 0.15rem !important;
			}

			.linspan_wx {
				margin-left: 0rem;
				display: -webkit-box;
				-webkit-line-clamp: 2;
				-webkit-box-orient: vertical;
				font-size: 0.13rem !important;
				min-height: 0.4rem;
			}

			.wxmoment_link {
				background: #EEEEEE;
				margin: 0.05rem 0rem;
				padding: 0.0rem 0.05rem;
				line-height: 0.18rem;
				vertical-align: middle;

			}

			.wxmoment_link img {
				height: 0.3rem;
				width: 0.3rem;
				margin-right: 0.05rem;
				vertical-align: middle;
				margin-top: 0.05rem;
				/* width: inherit; */
			}

			.emoji {
				background-image: url(../../images/emoji/emoji.png);
				background-repeat: no-repeat;
				background-size: 1300%;
				height: 0.2rem;
				background-position: center;
				display: inline-block;
				width: 0.2rem;
				margin: 0px 0.01rem;
				transform: translateY(0.05rem);
			}

			.emojiWuLian {
				background-image: url(../../images/emoji/WuLian.png) !important;
				background-size: cover;
			}

			.emojiCiYa {
				background-image: url(../../images/emoji/CiYa.png) !important;
				background-size: cover;
			}

			.emojiGuZhang {
				background-image: url(../../images/emoji/GuZhang.png) !important;
				background-size: cover;
			}

			.emojiXiGua {
				background-image: url(../../images/emoji/XiGua.png) !important;
				background-size: cover;
			}

			.insertBx {
				text-align: center;
				background: #EEEEEE;
				border-color: #EEEEEE;
				margin: 0.2rem 0px 0.2rem 20%;
				height: 0.4rem;
				width: 60%;
				color: #999;
				font-size: 0.16rem;
			}

			.insertBx:active {
				background: none !important;
			}

			.insertBx>span {
				border-radius: 50%;
				font-size: 0.25rem !important;
				margin-right: 0.05rem;
			}

			.mui-checkbox input[type=checkbox]:before,
			.mui-radio input[type=radio]:before {
				font-size: 18px !important;
			}

			.mui-popup-button:first-child {
				color: #47BAFE;
			}

			.mui-popup-button-bold {
				color: #47BAFE !important;
			}

			.zengYuan {
				/* height: 0.6rem; */
				width: 0.8rem;
				/* 	border: 1px solid #47BAFE;
				border-radius: 50%; */

			}

			#zengYuan_text {
				height: 0.5rem;
				width: 0.5rem;
				line-height: 0.5rem;
				float: right;
				border: 1px solid #47BAFE;
				color: #47BAFE;
				font-size: 0.13rem;
				border-radius: 50%;
			}

			/* 	.zengYuan p:first-child {
				background: #47BAFE;
				color: #FFFFFF;
				height: 0.25rem;
				line-height: 0.25rem;
			} */

			.zengYuan p {
				text-align: center;
				margin: 0rem;
				font-size: 0.14rem;
				height: 0.35rem;
				line-height: 0.35rem;
			}

			.pick_photo {
				width: 0.6rem;
				height: 0.6rem;
			}

			.display-inline {
				display: inline-block;
			}

			.card-dash {
				width: 100%;
				background-color: #FFFFFF;
				margin-top: 0.1rem;
				padding: 0.1rem 0;
			}

			.i_blue {
				color: #47BAFE
			}

			.left-border3 {
				border-left: 0.03rem solid #47BAFE;
			}

			.float-m9 {
				margin: 0 auto;
				width: 90%;
			}

			.clear2 {
				margin: 0.02rem 0;
			}

			.clear5 {
				margin: 0.05rem 0;
			}

			.clear10 {
				margin: 0.05rem 0;
			}

			label,
			i {
				color: #5A5A5A;
				font-size: 0.12rem;
			}

			.male_div label {
				padding: 0 0.1rem;
			}

			ul {
				padding-left: 0;
				margin: 0 auto;
			}

			li {
				;
				padding: 0.05rem 0.15rem !important;
				margin: 0 auto;
			}

			.checked {
				background-color: #47BAFE !important;
				color: #FFFFFF !important;
			}

			.uncheck {
				background-color: #EEEEEE;
			}

			.circle {
				border-radius: 50%;
				color: #999;
				 !important: 0.25rem;
				line-height: 0.25rem;
				text-align: center;
				font-size: 0.12rem;
				display: inline-block;
			}

			.label_lineh {
				line-height: 0.35rem;
				vertical-align: middle;
			}

			.mui-table-view-cell .label_lineh:first-child span {
				color: #47BAFE;
				font-size: 0.18rem;
				font-weight: normal;
			}

			.mui-table-view-cell .label_lineh:first-child {
				font-size: 0.13rem;
				font-weight: bold;
			}

			.btnSave {
				background: #47BAFE;
				margin: 0 auto;
				text-align: center;
				color: #FFFFFF;
				border: none;
				display: block;
				width: 1.5rem;
				height: 0.35rem;
				margin-top: 0.3rem;
			}

			#wfriends_m:after {
				border: none;
				display: none !important;
			}
		</style>
	</head>
	<body style="display: none;">
		<div id="lodingGif" style="color: #999999;text-align: center;height: 100vh; line-height: 100vh;background: #FFFFFF;">
			<img src="../../images/loadding.gif" style="width: 0.4rem; height: 0.4rem;vertical-align: middle;transform: translateY(-50px);"
			 alt="">
		</div>
		<div class="mui-content " style="display: none;" id="pullrefresh">
			<div class="mask" id="mask"></div>
			<div>
				<div class="border-solid card-dash" id="baseInfo_div" style="padding-top: 0rem;">
					<table class="float-m9" style="">
						<tr>
							<td style="width:0.8rem;">
								<img id="pick_photo" class="pick_photo" id="imgTx" data-url="{{val.wechat_img}}" data-preview-group="1" />
							</td>
							<td>
								<div id="div_name" style="height: 0.25rem;"><label style="font-size:0.15rem;font-weight: bold;padding: 0 0.05rem;color:#000;">
										<span id="customerName"></span> </label></div>
								<div id="div_concat">
									<div id="div_lastInteract"><label style="font-size: 0.13rem;">上次互动：</label><label id="label_lastInteract"
										 style="font-size: 0.13rem;">

										</label></div>

								</div>
							</td>
							<td style="width: 0.8rem;">
								<div class="zengYuan">
									<!-- <p>增员潜力</p> -->
									<p id="zengYuan_text">
										未评估
									</p>
								</div>

							</td>
						</tr>
					</table>
					<span class="clear10"></span>
					<table class='cont_table float-m9' style="padding:0.1rem 0.1rem;">
						<tr>
							<td><a href="javascript:;" onclick="insertFollow(0)"><i class="i_blue mui-icon mui-icon-phone-filled"></i><label>电话</label></a></td>
							<td><a href="javascript:;" onclick="mui.toast('导航功能暂未开放')"><i class="i_blue mui-icon mui-icon-map"></i><label>导航</label></a></td>
							<td><a href="javascript:;" onclick="insertFollow(1)"><i class="i_blue mui-icon mui-icon-weixin"></i><label>微信</label>
								</a></td>
						</tr>
					</table>
				</div>

				<div class="border-solid card-dash" id="wechat_friends" style="padding-bottom: 0rem;">
					<div class="left-border3 float-m9" style="padding-left:0.05rem ;margin-bottom: 0.1rem;"><label style="font-size: 0.17rem;font-weight: 700;">最近动态</label><label
						 id="wechat_count"></label></div>
					<!-- <hr class="float-m9" style="border:1px solid #EAE7E7;" /> -->
					<ul id="wfriends_m" class="mui-table-view">

					</ul>
					<p id="wfriends_noData" style="text-align: center;height: 0.5rem;line-height: 0.5rem; margin:0rem;">暂无动态</p>
					<!-- <div class="div_action_showmore float-m9" style="text-align: center;">展开全部>></div> -->
				</div>
				<div class="border-solid card-dash " id="schedule_history">
					<div class="left-border3 float-m9" style="padding-left:0.05rem ;margin-bottom: 0.1rem;"><label style="font-size: 0.17rem;font-weight: 700;">互动记录</label><label
						 id="history_count"></label></div>
					<!-- <hr class="float-m9" style="border:1px solid #EAE7E7;" /> -->
					<ul id="sHistory_m" class="mui-table-view">
						<!--  -->

					</ul>

					<button id="insertAudio_btn" type="button" class=" insertBx"><span class="mui-icon mui-icon-plusempty"></span>记录笔记</button>


					<!-- <div class="div_action_showmore float-m9" style="text-align: center;">展开全部>></div> -->
				</div>
				<div class="border-solid card-dash" id="upDateZengYuan">
					<ul class="mui-table-view  tblv-nl mt15" style="margin: 0rem;">
						<li class="mui-table-view-cell mui-collapse-content">
							<label class="mui-col-xs-3 mui-pull-left label_lineh" style="height: 0.7rem;line-height: 0.7rem;">
								<span class="iconfont iconlaiyuan1" style="transform: translateY(1px);display: inline-block;">&nbsp;</span>来<i
								 style="margin-right: 0.26rem;"></i>源：</label>
							<div class="team_type_div mui-input-row mui-col-xs-9 dis-ib label_lineh">
								<div id='team_type_A' class="check_team_type uncheck circle" style="width: 0.65rem;border-radius: 25px;">亲戚</div>
								<div id='team_type_B' class="check_team_type uncheck circle" style="width: 0.65rem;border-radius: 25px;">朋友</div>
								<div id='team_type_C' class="check_team_type uncheck circle" style="width: 0.65rem;border-radius: 25px;">同学</div>
								<div id='team_type_D' class="check_team_type uncheck circle" style="width: 0.65rem;border-radius: 25px;">邻居</div>
								<div id='team_type_E' class="check_team_type uncheck circle" style="width: 0.65rem;border-radius: 25px;">同事</div>
								<div id='team_type_F' class="check_team_type uncheck circle" style="width: 0.65rem;border-radius: 25px;">业务往来</div>
								<div id='team_type_G' class="check_team_type uncheck circle" style="width: 0.65rem;border-radius: 25px;">其他</div>
							</div>
						</li>
						<li class="mui-table-view-cell mui-collapse-content">
							<label class="mui-col-xs-3 mui-pull-left label_lineh">
								<span class="iconfont iconshouru3">&nbsp;</span>收<i style="margin-right: 0.26rem;"></i>入：</label>
							<div class="income_div mui-input-row mui-col-xs-9 dis-ib label_lineh">
								<div id='income_A' class="check_income uncheck circle" style="width: 0.65rem;border-radius: 25px;">2万以上</div>
								<div id='income_B' class="check_income uncheck circle" style="width: 0.65rem;border-radius: 25px;">1万以下</div>
								<div id='income_C' class="check_income uncheck circle" style="width: 0.65rem;border-radius: 25px;">5千以上</div>
								<div id='income_D' class="check_income uncheck circle" style="width: 0.65rem;border-radius: 25px;">其他</div>
							</div>
						</li>
						<li class="mui-table-view-cell mui-collapse-content">
							<label class="mui-col-xs-3 mui-pull-left label_lineh">
								<span class="iconfont iconnianling1">&nbsp;</span>年<i style="margin-right: 0.26rem;"></i>龄：</label>
							<div class="age_div mui-input-row mui-col-xs-9 dis-ib label_lineh">
								<div id='age_A' class="check_age uncheck circle" style="width: 0.65rem;border-radius: 25px;">30~40岁</div>
								<div id='age_B' class="check_age uncheck circle" style="width: 0.65rem;border-radius: 25px;">40~50岁</div>
								<div id='age_C' class="check_age uncheck circle" style="width: 0.65rem;border-radius: 25px;">20~30岁</div>
								<div id='age_D' class="check_age uncheck circle" style="width: 0.65rem;border-radius: 25px;">其他</div>
							</div>
						</li>
						<li class="mui-table-view-cell mui-collapse-content">
							<label class="mui-col-xs-3 mui-pull-left label_lineh">
								<span class="iconfont iconhunyin">&nbsp;</span>婚<i style="margin-right: 0.26rem;"></i>姻：</label>
							<div class="marriage_div mui-input-row mui-col-xs-9 dis-ib label_lineh">
								<div id='marriage_A' class="check_marriage uncheck circle" style="width: 0.65rem;border-radius: 25px;">已婚</div>
								<div id='marriage_B' class="check_marriage uncheck circle" style="width: 0.65rem;border-radius: 25px;">未婚</div>
								<div id='marriage_C' class="check_marriage uncheck circle" style="width: 0.65rem;border-radius: 25px;">离婚</div>
								<div id='marriage_D' class="check_marriage uncheck circle" style="width: 0.65rem;border-radius: 25px;">其他</div>
							</div>
						</li>
						<li class="mui-table-view-cell mui-collapse-content">
							<label class="mui-col-xs-3 mui-pull-left label_lineh">
								<span class="iconfont iconzhiye2">&nbsp;</span>职<i style="margin-right: 0.26rem;"></i>业：</label>
							<div class="profession_div mui-input-row mui-col-xs-9 dis-ib label_lineh">
								<div id='profession_A' class="check_profession uncheck circle" style="width: 0.65rem;border-radius: 25px;">专业人士</div>
								<div id='profession_B' class="check_profession uncheck circle" style="width: 0.65rem;border-radius: 25px;">营销类</div>
								<div id='profession_C' class="check_profession uncheck circle" style="width: 0.65rem;border-radius: 25px;">私营业主</div>
								<div id='profession_D' class="check_profession uncheck circle" style="width: 0.65rem;border-radius: 25px;">其他</div>
							</div>
						</li>
						<li class="mui-table-view-cell mui-collapse-content">
							<label class="mui-col-xs-3 mui-pull-left label_lineh">
								<span class="iconfont iconxueli3">&nbsp;</span>学<i style="margin-right: 0.26rem;"></i>历：</label>
							<div class="education_div mui-input-row mui-col-xs-9 dis-ib label_lineh">
								<div id='education_A' class="check_education uncheck circle" style="width: 0.65rem;border-radius: 25px;">大学</div>
								<div id='education_B' class="check_education uncheck circle" style="width: 0.65rem;border-radius: 25px;">大专</div>
								<div id='education_C' class="check_education uncheck circle" style="width: 0.65rem;border-radius: 25px;">高中</div>
								<div id='education_D' class="check_education uncheck circle" style="width: 0.65rem;border-radius: 25px;">其他</div>
							</div>
						</li>
						<li class="mui-table-view-cell mui-collapse-content">
							<label class="mui-col-xs-3 mui-pull-left label_lineh">
								<span class="iconfont iconshijian1">&nbsp;</span>认识时间：</label>
							<div class="meet_time_div mui-input-row mui-col-xs-9 dis-ib label_lineh">
								<div id='meet_time_A' class="check_meet_time uncheck circle" style="width: 0.65rem;;border-radius: 25px;">3年以上</div>
								<div id='meet_time_B' class="check_meet_time uncheck circle" style="width: 0.65rem;;border-radius: 25px;">1年以上</div>
								<div id='meet_time_C' class="check_meet_time uncheck circle" style="width: 0.65rem;;border-radius: 25px;">半年以下</div>
								<div id='meet_time_D' class="check_meet_time uncheck circle" style="width: 0.65rem;;border-radius: 25px;">其他</div>
							</div>
						</li>
						<li class="mui-table-view-cell mui-collapse-content">
							<label class="mui-col-xs-3 mui-pull-left label_lineh">
								<span class="iconfont icongongzuoshijian">&nbsp;</span>工作年限：</label>
							<div class="working_time_div mui-input-row mui-col-xs-9 dis-ib label_lineh">
								<div id='working_time_A' class="check_working_time uncheck circle" style="width: 0.65rem;;border-radius: 25px;">5年以上</div>
								<div id='working_time_B' class="check_working_time uncheck circle" style="width: 0.65rem;;border-radius: 25px;">3年以上</div>
								<div id='working_time_C' class="check_working_time uncheck circle" style="width: 0.65rem;;border-radius: 25px;">1年以下</div>
								<div id='working_time_D' class="check_working_time uncheck circle" style="width: 0.65rem;;border-radius: 25px;">其他</div>
							</div>
						</li>
					</ul>
					<textarea id="memotext" placeholder="在此填写备注" style="margin-bottom: 0.4rem;height: 0.8rem;color: #999999 ;font-size: 0.14rem;text-align: left;background: #F8F8F8;display:block;border:1px solid #F8F8F8;margin:0rem 5%;width: 90%;margin-bottom: 0.4rem;margin-top: 0.05rem;"></textarea>
					<!-- <button class="btnSave" id="btnSave">保存</button> -->
				</div>

			</div>







			<script type="text/html" id="wfriends_tp">
				{{each DATASET as val}} {{if val!=''}}
			<li class=" mui-collapseli"  style="padding: 0.1rem 0.15rem !important;">
				<div class="div_ac_type " style="background-color: #47BAFE !important">
					<span class="sp_ac_type">朋友圈</span>
				</div>
				<div class="div_plan" style="vertical-align: middle; display: inline-block;margin-left:0.15rem;">
					<div class="sp_log_time wxmoment_text zhankai2box" > <div class="textlength">{{val.moment_text}} </div></div>
					{{if val.moment_link!="" && val.moment_link!=null}}
						<div class=" wxmoment_link" >
						<img src="../../fonts/iconfont/wxllink.png" style="float: left;"  alt=""> 
						<span class="linspan_wx" style="align-items: center;display: flex;" >{{val.moment_link}}</span>	
						</div>
					{{/if}}
				
					<div class="clear2"></div>
					<span class="sp_action_time">{{val.moment_date}}</span>
						<span  class="sp_action_time iconfont zhankai2" style="float: right; font-size: 0.15rem; width: 0.7rem;text-align: right;">&#xe602;</span>
						<span  class="sp_action_time iconfont zhankai22" style="float: right; font-size: 0.15rem; display: none;width: 0.7rem;text-align: right;">&#xe601;</span>
				</div>
				<div class="div_location" onclick="" style="float: right;margin-right:0px;vertical-align:middle;">
					<!-- <i class="i_blue mui-icon mui-icon-plus-filled" style="line-height: 44px;"></i> -->
					</div>
			</li>
			{{/if}}
			{{/each}}
			</script>
			<script type="text/html" id="history_tp">
				{{each DATASET as val}} {{if val!=''}}
						<li class="mui-collapseli " style="padding: 0rem;" >
					<div class="div_ac_type bg_color_blue1" style="margin-left:0px; ">
						<span class="sp_log_type" style="padding: 0rem 0.05rem;" >
						{{ if val.record_id=="" || val.record_id==null}}
			                笔记					
						{{else}}
							录音
						{{/if}}
						</span>
					</div>
					<div class="div_plan" style=" margin-top: 0.1rem;display: inline-block;margin-left:0.15rem;width: calc(100% - 1rem);">
					{{ if val.record_id!="" && val.record_id!=null}}
			
						<div class="voice" onclick="audioPlay('{{val.audio_file_path}}',this)" style="color: #FFFFFF;">
						  <div class="bg "  style="float: left;"></div>
						  <div style="display: inline-block;height: 0.25rem;line-height: 0.25rem;margin-left: 50%;">{{val.audio_len}}"</div> 
						  </div>
						 <span style="float: right;display: inline-block;height: 0.3rem;line-height: 0.15rem; text-align: center;">{{val.memo_date.substr(0,10)}}<br>{{val.memo_date.substr(10,6)}}</span>
					{{else}}
					
					{{/if}}
						
						<div class="clear2" ></div>
						<!-- <span class="sp_log_time">{{val.sd_time}}</span> -->
						<div class="audiotext_lenbox opentiPrant"    >
							{{ if val.record_id!="" && val.record_id!=null}}
						<div class="sp_log_time audiotext_len chaochu" >{{val.memo_text}}</div>
						{{else}}
						<div class="sp_log_time audiotext_len chaochu" style="margin: 0rem;padding: 0rem;width: auto;" >{{val.memo_text}}</div>
			
						{{/if}}
						<div  class="zhankai iconfont" iszhankai="false" style="display: none;color: #999;position: absolute;right: 0.05rem;bottom: 0px;margin:0.05rem 0px;" onclick="opentips(this)">&#xe602;</div>
						</div>
								{{ if val.record_id=="" || val.record_id==null}}
							<span style="display: inline-block;height: 0.3rem; text-align: center;">{{val.memo_date}}</span>
							{{else}}
			
							{{/if}}
					<!-- 	<div class="audiotip ">
							{{val.audio_text}}
						</div> -->
					</div>
				</li>
				
			
				{{/if}}
				{{/each}}
				
			</script>



			<script type="text/javascript">
				script(['../../js/mui.min.js', '../../js/app/common.js', '../../libs/progressbar/progressbar.min.js'], false);
			</script>
			<script src="https://cdn.bootcss.com/jquery/1.11.3/jquery.min.js"></script>
			<script type="text/javascript">
				var backid = "index.html";
				var backurl = "../" + backid;
				var circle;
				var custId;
				var progname;
				var progimg;
				let postData = {};
				mui.init();
				var ws = null,
					wc = null;
					var tel,
					 wxno;
				mui.plusReady(function() {
					ws = plus.webview.currentWebview();
					ws.setStyle({
						scrollIndicator: "none"
					})
					custId = ws.custId;
					document.getElementById("pick_photo").setAttribute("src", ws.img);
					document.getElementById("customerName").innerText = ws.name;

					// mui.ready(function() {
					storage.init();
					storageUser = kidstorageuser.getInstance();
					getBaseInfo(custId);
					getWechatFriends();
					getCalllog();
					getScheduleHistoryList();
					// getScheduleList(custId);
					setTimeout(function() {
						document.getElementById("lodingGif").style.display = "none";
						document.getElementById("pullrefresh").style.display = "block";
					}, 200);
				last_touch_date();

				});
    
	              function last_touch_date(){
					  request("/cmdb/queryByCustomerID/", {
					  		cust_id: custId,
					  		sales_id: storageUser.UId
					  	}, function(r) {
					  		let data=r.DATASET[0];
					  				tel=data.phone_no;
					  				wxno=data.wechat_no;
					  				if(data.last_touch_date!=""){
					  					document.getElementById("label_lastInteract").innerText = data.last_touch_date;
					  				}else{
					  					document.getElementById("label_lastInteract").innerText = "暂无互动";
					  				}
					  
					  	})
				  }
				function initCheckBox(model) {
					if (model.team_type != null && model.team_type != "" && model.team_type != "undefined") {
						document.getElementById("team_type_" + model.team_type).classList.add("checked");
						postData.team_type = model.team_type;
					}
					if (model.fact_1 != null && model.fact_1 != "" && model.fact_1 != "undefined") {
						document.getElementById("income_" + model.fact_1).classList.add("checked");
						postData.fact_1 = model.fact_1;
					}

					if (model.fact_2 != null && model.fact_2 != "" && model.fact_2 != "undefined") {
						document.getElementById("age_" + model.fact_2).classList.add("checked");
						postData.fact_2 = model.fact_2;
					}
					if (model.fact_3 != null && model.fact_3 != "" && model.fact_3 != "undefined") {
						document.getElementById("marriage_" + model.fact_3).classList.add("checked");
						postData.fact_3 = model.fact_3;
					}
					if (model.fact_4 != null && model.fact_4 != "" && model.fact_4 != "undefined") {
						document.getElementById("profession_" + model.fact_4).classList.add("checked");
						postData.fact_4 = model.fact_4;
					}
					if (model.fact_5 != null && model.fact_5 != "" && model.fact_5 != "undefined") {
						document.getElementById("education_" + model.fact_5).classList.add("checked");
						postData.fact_5 = model.fact_5;
					}
					if (model.fact_6 != null && model.fact_6 != "" && model.fact_6 != "undefined") {
						document.getElementById("meet_time_" + model.fact_6).classList.add("checked");
						postData.fact_6 = model.fact_6;
					}
					if (model.fact_7 != null && model.fact_7 != "" && model.fact_7 != "undefined") {
						document.getElementById("working_time_" + model.fact_7).classList.add("checked");
						postData.fact_7 = model.fact_7;

					}

				}


				mui(".team_type_div").on("click", ".check_team_type", function() {
					mui(".check_team_type").each(function(index, item) {
						this.classList.remove("checked");
					});
					this.classList.add("checked");
					postData.team_type = this.id.split("_")[2];
				});
				mui(".income_div").on("click", ".check_income", function() {
					mui(".check_income").each(function(index, item) {
						this.classList.remove("checked");
					});
					this.classList.add("checked");
					postData.fact_1 = this.id.split("_")[1];
				});

				mui(".age_div").on("click", ".check_age", function() {
					mui(".check_age").each(function(index, item) {
						this.classList.remove("checked");
					});
					this.classList.add("checked");
					postData.fact_2 = this.id.split("_")[1];

				});
				mui(".marriage_div").on("click", ".check_marriage", function() {
					mui(".check_marriage").each(function(index, item) {
						this.classList.remove("checked");
					});
					this.classList.add("checked");
					postData.fact_3 = this.id.split("_")[1];

				});
				mui(".profession_div").on("click", ".check_profession", function() {
					mui(".check_profession").each(function(index, item) {
						this.classList.remove("checked");
					});
					this.classList.add("checked");
					postData.fact_4 = this.id.split("_")[1];

				});
				mui(".education_div").on("click", ".check_education", function() {
					mui(".check_education").each(function(index, item) {
						this.classList.remove("checked");
					});
					this.classList.add("checked");
					postData.fact_5 = this.id.split("_")[1];

				});
				mui(".meet_time_div").on("click", ".check_meet_time", function() {
					mui(".check_meet_time").each(function(index, item) {
						this.classList.remove("checked");
					});
					this.classList.add("checked");
					postData.fact_6 = this.id.split("_")[2];

				});
				mui(".working_time_div").on("click", ".check_working_time", function() {
					mui(".check_working_time").each(function(index, item) {
						this.classList.remove("checked");
					});
					this.classList.add("checked");
					postData.fact_7 = this.id.split("_")[2];

				});











				function getWechatFriends() {
					var self = plus.webview.currentWebview();
					custId = self.custId;
					request("/cmdb/queryWechatGroupByCustID/", {
						sales_id: storageUser.UId,
						cust_id: custId
					}, function(data) {
						// console.log(JSON.stringify(data));
						document.getElementById("wechat_count").innerHTML = "（" + data.DATASET.length + "条）";
						if (data.DATASET != '') {
							document.getElementById("wfriends_noData").style.display = "none";
						}
						// console.log(JSON.stringif(data));
						render("#wfriends_m", "wfriends_tp", data);
						let moment_textObj = document.getElementsByClassName("wxmoment_text");
						let textlength = document.getElementsByClassName("textlength");
						for (let i = 0; i < data.DATASET.length; i++) {
							let text = data.DATASET[i].moment_text;
							// 替换朋友圈字段字符串中表情text为i标签
							let regex = /\[(.+?)\]/g;
							let emojiObj = text.match(regex);
							let arr = [];
							if (emojiObj != null) {
								for (let j = 0; j < emojiObj.length; j++) {
									let emoji_name = emojiObj[j].split('[')[1].split(']')[0];
									// alert(emoji_name);
									let arrName = ["西瓜", "捂脸", "鼓掌", "呲牙"];
									let isDy = 0;
									for (let s = 0; s < arrName.length; s++) {
										if (emoji_name != arrName[s]) {
											isDy++;
										} else {
											isDy--;
										}
									}
									if (isDy >= arrName.length) {
										text = text.replace(emojiObj[j], "<span style='font-size:0.15rem'> [" + emoji_name.toString() + "] </span>");
									} else {
										text = text.replace(emojiObj[j], "<i class='emoji emoji" + ConvertPinyin(emoji_name.toString()) + "'> </i>");

									}
									// var result=emojiObj[j].replace(emojiObj[j],"<i class='emoji emoji"+ ConvertPinyin(emoji_name.toString())+"'> </i>");
								}
								// alert("表情"+text);
								moment_textObj[i].innerHTML = text;
							}
							// alert(textlength[i].innerHTML);
							// alert(document.getElementsByClassName("textlength")[i].innerHTML);
						}

						// obj=obj.substring(index+1,obj.length);
						let linkspan = document.getElementsByClassName("linspan_wx");
						let zkbtn = document.getElementsByClassName("zhankai2");
						let zkbtn2 = document.getElementsByClassName("zhankai22");
						let zkbox = document.getElementsByClassName("zhankai2box");
						for (let i = 0; i < zkbtn.length; i++) {
							zkbtn[i].addEventListener("tap", function() {
								zkbtn[i].style.display = "none";
								zkbtn2[i].style.display = "block";
								// zkbtn[i].innerHTML="&#xe601;";
								zkbox[i].style.display = "block";
								zkbox[i].style.overflow = "inherit";
							});
							zkbtn2[i].addEventListener("tap", function() {
								zkbtn[i].style.display = "block";
								zkbtn2[i].style.display = "none";
								zkbox[i].style.display = "-webkit-box";
								zkbox[i].style.overflow = "hidden";
							})
						}
					})
				}



				function getBaseInfo(custId) {
					mui.ajax('http://118.25.184.62:8000/cmdb/queryTeamEvaluateByCustID/', {
						data: {
							cust_id: custId,
							sales_id: storageUser.UId
						},
						dataType: 'json', //服务器返回json格式数据
						type: 'post', //HTTP请求类型
						timeout: 10000, //超时时间设置为10秒；
						success: function(data) {
							var model = data.DATASET[0];
							if (model == "" || model==undefined) {
								postData.fact_7 = "D";
								postData.fact_6 = "D";
								postData.fact_5 = "D";
								postData.fact_4 = "D";
								postData.fact_3 = "D";
								postData.fact_2 = "D";
								postData.fact_1 = "D";
								postData.team_type = "G";
								document.getElementById("team_type_" + "G").classList.add("checked");
								document.getElementById("income_" + "D").classList.add("checked");
								document.getElementById("age_" + "D").classList.add("checked");
								document.getElementById("marriage_" + "D").classList.add("checked");
								document.getElementById("profession_" + "D").classList.add("checked");
								document.getElementById("education_" + "D").classList.add("checked");
								document.getElementById("meet_time_" + "D").classList.add("checked");
								document.getElementById("working_time_" + "D").classList.add("checked");

							} else {
								initCheckBox(model);
								if(model.memo!=undefined && model.memo!=""){
									document.getElementById("memotext").value=model.memo;
								}else{
									document.getElementById("memotext").value="";
								}
							}
							
							
							let evaluate_score="未评估";
							switch (model.evaluate_score){
								case "A":
								evaluate_score="高";
									break;
								case "B":
								evaluate_score="中";
									break;
								case "C":
								evaluate_score="低";
									break;
								case "D":
								evaluate_score="未知";
									break;
								default:
								evaluate_score="未评估";
									break;
							}
							document.getElementById("zengYuan_text").innerText=evaluate_score;
						},
						error: function(xhr, type, errorThrown) {

						}
					});
					// requestJsonFile("../../data/customerdetail/baseinfo.json", {custId:custId}, function(r) {

				}



					var p = null;
				
				function audioPlay(url, elm) {
					console.log(url);
					jQuery('.bg').removeClass("voicePlay");
					p = plus.audio.createPlayer(url);
					if (p.isPaused() == true) {
						$(elm).find('.bg').addClass("voicePlay");
						p.play(function() {
							// mui.toast("播放完成");
							jQuery('.bg').removeClass("voicePlay");
							p.stop();
							p = null;
						}, function(e) {
							mui.toast('播放音频文件"' + url + '"失败：' + e.message);
						});
					} else {
						p.stop();
						p = null;
					}
					// document.getElementById("iplay").style.backgroundImage="url(../../fonts/iconfont/audiostop.png)";
				
				}

				function opentips(elm) {
					jQuery(".zhankai").parent().addClass("opentiPrant");
					jQuery(".zhankai").prev().addClass("chaochu");
					jQuery(".zhankai").html("&#xe602;");
					if (jQuery(elm).attr("iszhankai") == "false") {
						jQuery(elm).parent().removeClass("opentiPrant");
						jQuery(elm).prev().removeClass("chaochu");
						jQuery(elm).html("&#xe601;");
						jQuery(elm).attr("iszhankai", "true");
					} else {
						jQuery(elm).parent().addClass("opentiPrant");
						jQuery(elm).prev().addClass("chaochu");
						jQuery(elm).html("&#xe602;");
						jQuery(elm).attr("iszhankai", "false");
					}

				}

				function saveFrom() {
					request("/cmdb/insertTeamEvaluateByCustID/", {
						sales_id: storageUser.UId,
						cust_id: custId,
						team_type: postData.team_type,
						memo:document.getElementById("memotext").value,
						fact_1: postData.fact_1,
						fact_2: postData.fact_2,
						fact_3: postData.fact_3,
						fact_4: postData.fact_4,
						fact_5: postData.fact_5,
						fact_6: postData.fact_6,
						fact_7: postData.fact_7
					}, function(r) {
						mui.back();
						mui.toast(r.ERROR_MESSAGE);
					})
				}
				document.addEventListener("xlsx", function() {
					getCalllog();
					getScheduleHistoryList();
					// getBaseInfo();
					last_touch_date();
				})

				function getScheduleHistoryList() {
					storage.init();
					storageUser = kidstorageuser.getInstance();
					request("/cmdb/queryAudioMemosByCustID/", {
						cust_id: custId,
						sales_id: storageUser.UId
					}, function(r) {
						//mui.get("../../data/customerdetail/schedule_history.json", {custId:custId}, function(r) {
						//log(r);
						console.log(JSON.stringify(r));
						// document.getElementById("history_count").innerText = "（" + r.DATASET.length + "个）";
						render("#sHistory_m", "history_tp", r);
						getCalllog(r.DATASET.length); //获取通话记录
						console.log(JSON.stringify(r));
						let audiotext_lenbox = $(".audiotext_lenbox");
						setTimeout(function() {
							for (let i = 0; i < audiotext_lenbox.length; i++) {
								if (jQuery(audiotext_lenbox[i]).find(".audiotext_len").width() > $(audiotext_lenbox[i]).width()) {
									jQuery(audiotext_lenbox[i]).find(".zhankai").css("display", "inline-block");
								}
							}
						}, 600);


					})
				}

				function getCalllog(count) {
					var self = plus.webview.currentWebview();
					custId = self.custId;
					request("/cmdb/queryPhoneRecordByCustID/", {
						sales_id: storageUser.UId,
						cust_id: custId
					}, function(data) {
						console.log(JSON.stringify(data));
						let request = data.DATASET;
						document.getElementById("history_count").innerHTML = "（" + (data.DATASET.length + count) + "条）";

						if (data.DATASET.length < 0) {
							return;
						}
						let ul = document.getElementById("sHistory_m");
						const fragment = document.createDocumentFragment();

						for (let i = 0; i < data.DATASET.length; i++) {
							const li = document.createElement("li");
							console.log();
							li.className = "mui-collapseli call_li";
							li.style.paddingLeft = "0.0rem";
							let creat_time = [];
							let time;
							if (request[i].contact_duration > 60) {
								creat_time.push((request[i].contact_duration / 60).toString().split('.')[0]);
								creat_time.push((request[i].contact_duration % 60));
								if (creat_time[1] < 10) {
									time = creat_time[0] + "分0" + creat_time[1] + "秒";
								} else {
									time = creat_time[0] + "分" + creat_time[1] + "秒";
								}
							} else if (request[i].contact_duration > 3600) {
								creat_time.push((request[i].contact_duration / 3600).toString().split('.')[0]);
								creat_time.push((request[i].contact_duration % 3600));
								if (creat_time[1] < 10) {
									time = creat_time[0] + " 小时0" + creat_time[1] + " 分钟";

								} else {
									time = creat_time[0] + " 小时" + creat_time[1] + " 分钟";
								}
							} else {
								time = request[i].contact_duration + " 秒";
							}
							let contact_type;
							if (request[i].contact_type == "1") {
								contact_type = '<span style="color:#36ab60;font-size:0.13rem" class="iconfont iconhuru">&nbsp;</span> ';
							} else if (request[i].contact_type == "2") {
								contact_type = '<span style="color:#7dc5eb;font-size:0.14rem" class="iconfont iconhuchu">&nbsp;</span> ';
							} else {
								contact_type =
									'<span style="color:#f07768;font-size:0.14rem" class="iconfont iconweijietong">&nbsp;</span ><span style="color:#f07768;font-size:0.14rem" >未接通</span> ';
								time = "";
							}

							li.innerHTML =
								'<div class="div_ac_type " style="background-color: #47BAFE !important"><span class="sp_ac_type" style="padding: 0rem 0.05rem;">电话</span></div>' +
								' <div class="div_plan" style="vertical-align: middle; display: inline-block;margin-left:0.15rem;">' +
								' <div class="sp_log_time  " >' + contact_type + time + '</div><div class="clear2"></div>' +
								' <span class="sp_action_time">' + request[i].contact_date.substring(0, 16) + '</span></div>' +
								' <div class="iconfont " style="color: #47BAFE;font-size: 0.18rem;">&#xe619;</div>';
							fragment.appendChild(li);

						}
						ul.appendChild(fragment);
					})
				}

				function insertFollow(type) {
						let wechat_no=wxno;
                        if(parseInt(type)==0){
								if (mui.os.plus) {
									if (tel != "" && tel != null) {
										plus.device.dial(tel);
									} else {
										mui.toast("还没有绑定客户手机号！");
									}
								} else {
									location.href = "tel:" + tel;
								}
						}else{
							var timeout, t = 1000,
								hasApp = true;
							setTimeout(function() {
								if (!hasApp) {
									//没有安装微信
									var r = confirm("您没有安装微信，请先安装微信!");
									if (r == true) {
										location.href = "http://weixin.qq.com/"
									}
								} else {
									//安装微信
								}
								// document.body.removeChild(ifr);
							}, 2000);
							if (wechat_no != "" && wechat_no != null) {
								// mui.toast("正在跳转微信...");
								copy_fun(wechat_no,"微信ID已复制，可粘贴到微信搜索框，查找客户开始聊天");  	
								isGj = true;
								setTimeout(function() {
									location.href = "weixin://";
								}, 1000);
							} else {
								mui.toast("还没有绑定客户微信号信息！");
							}
						}
						request("/cmdb/insertLpActFollowup/", {
							id: "99999999999999999999999999999999",
							sales_id: storageUser.UId,
							cust_id: custId,
							act_followup_type: type
						}, function(result) {
							// mui.toast(JSON.stringify(result));
							pulldownRefresh();
						});
				}


				document.getElementById("insertAudio_btn").addEventListener("tap", function() {

					let progname = plus.webview.currentWebview().name;
					let progimg = plus.webview.currentWebview().img;
					mui.openWindow({
						url: "../sound/programme.html",
						id: "programme",
						extras: {
							cust_id: custId,
							name: progname,
							img: progimg,
						},
						styles: {
							titleNView: {
								autoBackButton: true,
								backgroundcolor: "#47BAFE",
								titleText: "智能笔记",
								titlecolor: "white",
							}
						},
						show: {
							autoShow: true, //页面loaded事件发生后自动显示，默认为true
							aniShow: 'slide-in-bottom', //页面显示动画，默认为”slide-in-right“；
						},
						waiting: {
							autoShow: false
						}
					})
				})
			</script>
	</body>
</html>
